package db;

/**
 * Contém as informações de acesso ao banco de dados
 */
public class BancodeDados {
    //Alterar valores para MySQL
    //postgre
    //private static final String HEAD = "jdbc:postgresql";
    //private static final String HOST = "localhost";
    //private static final String PORT = "5432";
    //private static final String DB = "teste_db";
    //private static final String DRIVER = "org.postgresql.Driver";

    //private static final String USER_NAME = "test_user";
    //private static final String USER_PASS = "test_user1";

    //MySQL
    private static final String HEAD = "jdbc:mysql";
    private static final String HOST = "localhost";    
    private static final String DB = "bdlivraria";
    private static final String DRIVER = "org.gjt.mm.mysql.Driver";

    private static final String USER_NAME = "root";
    private static final String USER_PASS = "pwd";

    public static String getURL()
    {
        //return HEAD + "://" + HOST + ":" + PORT + "/" + DB; --postgres
        return HEAD + "://" + HOST + "/" + DB; // mysql
    }

    public static String getUserName()
    {
        return USER_NAME;
    }

    public static String getUserPassword()
    {
        return USER_PASS;
    }

    public static String getDriver()
    {
        return DRIVER;
    }
}
